<template>
  <el-dialog title="提示" :visible.sync="dialogVisible" :fullscreen="true" :before-close="handleClose">
  	
    <base-info :person="person" />
    <div v-loading.fullscreen.lock="loading">2222</div>
    <span>这是一段信息</span>
    <span slot="footer" class="dialog-footer">
      <el-button @click="handleClose">取 消</el-button>
      <el-button type="primary" @click="handleClose">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
import baseInfo from './baseInfo';
export default {
  name: 'keyPersonDetail',
  components: {
    baseInfo
  },
  props: ['show', 'person'],
  data() {
    return {
      loading: true,
      dialogVisible: false
    };
  },
  watch: {
    show: function(val) {
      if (val) {
        this.getDetail();
      }
      this.dialogVisible = val;
    }
  },
  methods: {
    async getDetail() {
      this.loading = true;
      const { bean } = await this.$services.post({
        type: 'REPORT',
        url: 'getRepMonthControllerDetail',
        params: {
          id: this.id
        }
      });
      this.loading = false;
      this.detailList = bean.repMonthDetails;
    },
    handleClose() {
      this.dialogVisible = false;
      this.$emit('close');
    }
  }
};

</script>
<style lang="scss" scoped>
</style>
